import asyncio

async def worker(num):
    """协程函数"""
    print('Worker:', num)
    await asyncio.sleep(1)  # 模拟耗时操作

async def main():
    tasks = []
    for i in range(5):
        task = asyncio.create_task(worker(i))  # 创建协程任务
        tasks.append(task)
    await asyncio.gather(*tasks)  # 并发执行协程任务

if __name__ == '__main__':
    asyncio.run(main())
